﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace Microhard.Framework.MVCHelper.Mobile
{
    public static class MobileControls
    {
        public static MvcHtmlString Mobile_Textbox(this HtmlHelper helper, string ctrID, string txt, string value)
        {
            string txtformat = "<label class=\"ui-hidden-accessible\" for=\"" + ctrID + "\">" + txt + ":</label>" +
                               "<input name=\"" + ctrID + "\" id=\"" + ctrID + "\" type=\"text\" placeholder=\"" + txt + "\" value=\"" + value + "\">";
            return new MvcHtmlString(txtformat);
        }

        public static MvcHtmlString Mobile_TextArea(this HtmlHelper helper, string ctrID, string txt, string rows, string cols, string value)
        {
            string txtformat = "<label for=\"" + ctrID + "\">" + txt + ":</label>" +
                               "<textarea name=\"" + ctrID + "\" id=\"" + ctrID + "\" rows=\"" + rows + "\" cols=\"" + cols + "\" placeholder=\"" + txt + "\">" + value + "</textarea>";
            return new MvcHtmlString(txtformat);
        }

        public static MvcHtmlString Mobile_DatePicker(this HtmlHelper helper, string ctrID, string txt, string value)
        {
            string format = "<label for=\"" + ctrID + "\">" + txt + ":</label>" +
                            "<input type=\"text\" data-role=\"date\" id=\"" + ctrID + "\">";
            return new MvcHtmlString(format);
        }

    }
}
